SELinux policy controls whether users are able to modify the SELinux context for any given file. When using chcon , users provide all or part of the SELinux ...
The semanage fcontext command is used to change the SELinux context of files. ... As the Linux root user, run the semanage fcontext -a -t httpd_sys_content_t / ...
Next: SEtools Up: SELinux Previous: SELinux 執行策略 Contents DYWANG_HOME ... set role ROLE in the target security context -t ... httpd_sys_content_t /usr/share/ ...
Run the chcon -t type file-name command to change the file type, where type is a type, such as httpd_sys_content_t , and file-name is a file or directory name.
The ls -Z command can be used to view the SELinux context of a file or directory. In this example, the SELinux context of files in the /var/www/html ...
2023年6月8日 — For this, we can use semanage to change the type context: semanage fcontext -a -t httpd_sys_content_t '/var/www/html(/.*)?' The -t flag denotes ...
2023年7月31日 — Match those SELinux contexts so /srv/www is listed as httpd_sys_content_t. Change the SELinux type for the new directory with the following: